home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 22 / Cream of the Crop 22.iso / doom / quake3.zip / SOULSWP1.ZIP / SOULSWP.PAT < prev    next >
Text File  |  1996-08-24  |  6KB  |  169 lines

  1. diff -ur --new-file -x progs.dat -x progdefs.h -x *.bak -x *~ -x *.rej -x *.cfg -x *.sav v101qc/foo.pl soulswp/foo.pl
  2. --- v101qc/foo.pl    Wed Dec 31 18:00:00 1969
  3. +++ soulswp/foo.pl    Sat Aug 24 20:44:38 1996
  4. @@ -0,0 +1,3 @@
  5. +#!/usr/bin/perl -n
  6. +($a, $b) = split;
  7. +print "$a = other.$b; other.$b = self.$b; self.$b = $a;\n"
  8. Binary files v101qc/progs/null.spr and soulswp/progs/null.spr differ
  9. diff -ur --new-file -x progs.dat -x progdefs.h -x *.bak -x *~ -x *.rej -x *.cfg -x *.sav v101qc/progs.src soulswp/progs.src
  10. --- v101qc/progs.src    Wed Jul 31 21:15:26 1996
  11. +++ soulswp/progs.src    Sat Aug 24 20:54:03 1996
  12. @@ -6,6 +6,7 @@
  13.  ai.qc
  14.  combat.qc
  15.  items.qc
  16. +w-soulsw.qc
  17.  weapons.qc
  18.  world.qc
  19.  client.qc
  20. diff -ur --new-file -x progs.dat -x progdefs.h -x *.bak -x *~ -x *.rej -x *.cfg -x *.sav v101qc/w-soulsw.qc soulswp/w-soulsw.qc
  21. --- v101qc/w-soulsw.qc    Wed Dec 31 18:00:00 1969
  22. +++ soulswp/w-soulsw.qc    Sat Aug 24 21:48:08 1996
  23. @@ -0,0 +1,123 @@
  24. +//  Soul swap weapon, by Jeff Epler
  25. +// jepler@inetnebr.com
  26. +//
  27. +// Insert this file in progs.src before weapons.qc, and add
  28. +// a way in weapons.qc to call SoulSwapFire.  I suggest putting it on
  29. +// an impulse
  30. +
  31. +void(vector org) spawn_tfog;
  32. +
  33. +//void() SoulSwapPrecache = {
  34. +//    precache_model("progs/null.spr");
  35. +//};
  36. +
  37. +void(void() g) SoulSwapTouch = { // 'g' is a hack, local function vars
  38. +// don't seem to exist
  39. +    local float f;
  40. +    local entity e;
  41. +    local vector v;
  42. +    local entity o, s;
  43. +    local string c;
  44. +
  45. +    o=other; s=self.owner;
  46. +    
  47. +    if(o.classname != "player") { remove(self); return; }
  48. +    if(s.health <= 0) { remove(self); return; }
  49. +    if(o.health <= 0) { remove(self); return; }
  50. +
  51. +    spawn_tfog(s.origin + 20 * v_forward);
  52. +    spawn_tfog(o.origin + 20 * v_forward);
  53. +
  54. +
  55. +f = o.health; o.health = s.health; s.health = f;
  56. +
  57. +f = o.ammo_shells; o.ammo_shells = s.ammo_shells; s.ammo_shells = f;
  58. +f = o.ammo_nails; o.ammo_nails = s.ammo_nails; s.ammo_nails = f;
  59. +f = o.ammo_rockets; o.ammo_rockets = s.ammo_rockets; s.ammo_rockets = f;
  60. +f = o.ammo_cells; o.ammo_cells = s.ammo_cells; s.ammo_cells = f;
  61. +f = o.currentammo; o.currentammo = s.currentammo; s.currentammo = f;
  62. +f = o.weapon; o.weapon = s.weapon; s.weapon = f;
  63. +c = o.weaponmodel; o.weaponmodel = s.weaponmodel; s.weaponmodel = c;
  64. +f = o.items; o.items = s.items; s.items = f;
  65. +
  66. +f = o.armortype; o.armortype = s.armortype; s.armortype = f;
  67. +f = o.armorvalue; o.armorvalue = s.armorvalue; s.armorvalue = f;
  68. +
  69. +f = o.flags; o.flags = s.flags; s.flags = f;
  70. +f = o.effects; o.effects = s.effects; s.effects = f;
  71. +
  72. +// f = o.attack_finished; o.attack_finished = s.attack_finished; s.attack_finished = f;
  73. +s.attack_finished = o.attack_finished; // Don't penalize attacked
  74. +
  75. +f = o.pain_finished; o.pain_finished = s.pain_finished; s.pain_finished = f;
  76. +
  77. +f = o.invincible_finished; o.invincible_finished = s.invincible_finished; s.invincible_finished = f;
  78. +f = o.invisible_finished; o.invisible_finished = s.invisible_finished; s.invisible_finished = f;
  79. +f = o.super_damage_finished; o.super_damage_finished = s.super_damage_finished; s.super_damage_finished = f;
  80. +f = o.radsuit_finished; o.radsuit_finished = s.radsuit_finished; s.radsuit_finished = f;
  81. +
  82. +f = o.invincible_time; o.invincible_time = s.invincible_time; s.invincible_time = f;
  83. +f = o.invincible_sound; o.invincible_sound = s.invincible_sound; s.invincible_sound = f;
  84. +
  85. +f = o.invisible_time; o.invisible_time = s.invisible_time; s.invisible_time = f;
  86. +f = o.invisible_sound; o.invisible_sound = s.invisible_sound; s.invisible_sound = f;
  87. +
  88. +f = o.super_time; o.super_time = s.super_time; s.super_time = f;
  89. +f = o.super_sound; o.super_sound = s.super_sound; s.super_sound = f;
  90. +
  91. +f = o.rad_time; o.rad_time = s.rad_time; s.rad_time = f;
  92. +
  93. +f = o.jump_flag; o.jump_flag = s.jump_flag; s.jump_flag = f;
  94. +f = o.swim_flag; o.swim_flag = s.swim_flag; s.swim_flag = f;
  95. +f = o.air_finished; o.air_finished = s.air_finished; s.air_finished = f;
  96. +f = o.bubble_count; o.bubble_count = s.bubble_count; s.bubble_count = f;
  97. +c = o.deathtype; o.deathtype = s.deathtype; s.deathtype = c;
  98. +
  99. +f = o.nextthink; o.nextthink = s.nextthink; s.nextthink = f;
  100. +g = o.think; o.think = s.think; s.think = g;
  101. +
  102. +v = o.origin; o.origin = s.origin; s.origin = v;
  103. +v = o.v_angle; o.v_angle = s.v_angle; s.v_angle = v;
  104. +v = o.view_ofs; o.view_ofs = s.view_ofs; s.view_ofs = v;
  105. +v = o.velocity; o.velocity = s.velocity; s.velocity = v;
  106. +v = o.angles; o.angles = s.angles; s.angles = v;
  107. +v = o.avelocity; o.avelocity = s.avelocity; s.avelocity = v;
  108. +v = o.punchangle; o.punchangle = s.punchangle; s.punchangle = v;
  109. +
  110. +    s.fixangle = 1;
  111. +    s.teleport_time = time + 0.1;
  112. +    if(s.flags & FL_ONGROUND)
  113. +        s.flags = s.flags - FL_ONGROUND;
  114. +
  115. +    o.fixangle = 1;
  116. +    o.teleport_time = time + 0.1;
  117. +    if(o.flags & FL_ONGROUND)
  118. +        o.flags = o.flags - FL_ONGROUND;
  119. +
  120. +    remove(self);
  121. +};
  122. +
  123. +void() SoulSwapFire = {
  124. +    local entity missile;
  125. +
  126. +    sound (self, CHAN_WEAPON, "weapons/sgun1.wav", 1, ATTN_NORM);
  127. +    self.attack_finished = time + 8;
  128. +    missile = spawn();
  129. +    missile.owner = self;
  130. +    missile.solid = SOLID_BBOX;
  131. +    missile.movetype = MOVETYPE_FLYMISSILE;
  132. +    setmodel(missile, "progs/s_spike.mdl");
  133. +    missile.effects = EF_DIMLIGHT | EF_BRIGHTFIELD;
  134. +    
  135. +    missile.touch = SoulSwapTouch;
  136. +    missile.think = SUB_Remove;
  137. +    missile.nextthink = time + 4;
  138. +
  139. +    makevectors (self.v_angle);
  140. +    missile.velocity = aim(self, 1000);
  141. +    missile.velocity = 400 * missile.velocity;
  142. +    missile.angles = vectoangles(missile.velocity);
  143. +
  144. +    setsize (missile, '0 0 0', '0 0 0');
  145. +    setorigin (missile, self.origin + v_forward*8 + '0 0 16');
  146. +};
  147. diff -ur --new-file -x progs.dat -x progdefs.h -x *.bak -x *~ -x *.rej -x *.cfg -x *.sav v101qc/weapons.qc soulswp/weapons.qc
  148. --- v101qc/weapons.qc    Thu Jul 25 01:51:24 1996
  149. +++ soulswp/weapons.qc    Sat Aug 24 21:21:42 1996
  150. @@ -22,6 +22,8 @@
  151.      precache_sound ("weapons/grenade.wav");    // grenade launcher
  152.      precache_sound ("weapons/bounce.wav");        // grenade bounce
  153.      precache_sound ("weapons/shotgn2.wav");    // super shotgun
  154. +
  155. +    //SoulSwapPrecache();
  156.  };
  157.  
  158.  float() crandom =
  159. @@ -1169,6 +1171,9 @@
  160.          CycleWeaponCommand ();
  161.      if (self.impulse == 11)
  162.          ServerflagsCommand ();
  163. +
  164. +    if(self.impulse == 12)
  165. +        SoulSwapFire();
  166.  
  167.      if (self.impulse == 255)
  168.          QuadCheat ();
  169.